<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>My JSP 'index.jsp' starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=true"></script>
<script src="http://www.google.com/jsapi?key=ABQIAAAAUC1v3jGuKkZU5KBoaPKaqhTwM0brOpm-All5BF6PoaKBxRWWERS4m_UQVf4z2WBVSz0YsZQT2INjJQ"></script>
<script type="text/javascript">
    google.load('maps', '2');
    var map;

    function initialize() {
      map = new GMap2(document.getElementById("map"));
      map.setCenter(new GLatLng(37.4328, -122.077), 0);

      // The following line makes the map Earth-enabled by adding the
      // "Earth" button to the map type control.  Note that you still
      // need to add a map type control (GMapTypeControl,
      // GMenuMapTypeControl, or GHierarchicalMapTypeControl) to the
      // the map (as is done below) for the "Earth" button and the rest
      // of the map type buttons to show up at all.
      map.addMapType(G_SATELLITE_3D_MAP);

      map.addControl(new GHierarchicalMapTypeControl());
      map.addControl(new GLargeMapControl());
      
      var marker = new GMarker(new GLatLng(37.4228, -122.085));
      GEvent.addListener(marker, "click", function() {
        var html = '<div style="width: 210px; padding-right: 10px">Hello world!<\/div>';
        marker.openInfoWindowHtml(html);
      });
      map.addOverlay(marker);
      GEvent.trigger(marker, "click");

      var polyline = new GPolyline([
          new GLatLng(37.4419, -122.1419),
          new GLatLng(37.4219, -122.1219),
          new GLatLng(37.4319, -122.1119),
          new GLatLng(37.4119, -122.0919)
         ], "#ff0000", 10);
      GEvent.addListener(polyline, "click", function(latlng) {
        var html = '<div style="width: 210px; padding-right: 10px">A polyline.<\/div>';
        map.openInfoWindowHtml(latlng, html);
      });
      map.addOverlay(polyline);
    }
    </script>

</head>
<body  onload="initialize()" onunload="GUnload">
<div id="map" class="map" style="width:800px;height:600px"></div>
</body>
</html>
